﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;
using System.Xml.Linq;
using System.IO;
using MyVideoViewerLibrary;

using Microsoft.MediaCenter.UI;

namespace MyVideoViewerMCPlugin
{
    public class TVSeries : ModelItem
    {
        public Series Series { get; set; }
        public string RatingToString
        {
            get
            {
                if (Series.Rating.HasValue)
                    return Series.Rating.Value.ToString();
                else
                    return "";
            }
        }
        public string RuntimeToString
        {
            get
            {
                if (Series.Runtime.HasValue)
                    return Series.Runtime.Value.ToString();
                else
                    return "";
            }
        }
        public string GenresToString
        {
            get
            {
                return string.Join(", ", Series.Series_Genres.Select(sg => sg.Genre.GenreDesc).ToArray());
            }
        }
        public string NetworkToString
        {
            get
            {
                if (Series.Network != null)
                    return Series.Network.Name;
                else
                    return "";
            }
        }

        public TVSeries() { }
        public TVSeries(Series series)
        {
            Series = series;
        }
    }
}
